package com.example.project_01.mapper;

import com.example.project_01.pojo.City;
import com.example.project_01.entity.CityEntity;
import com.example.project_01.model.CityModel;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

//@Component
//@Mapper
public interface CityMapper {

    //获取所有城市信息，name不为空则模糊查询
    List<CityModel> getAllCity(String name);

    //根据id查找一个城市信息
    City getCityById(Integer id);

    //添加一个城市的信息
    int addCity(CityEntity city);

    //检查城市是否存在
    int checkCityByNum(Integer cityNumber);

    //根据id删除城市信息
    int delectCityById(Integer id);

}
